public class TransformTest{
	public static void main(String[] args) {
		//声明两个变量并初始化
		byte b1 = 10;
		short s1 = 20;
		System.out.println("b1 = " + b1);
		System.out.println("s1 = " + s1);		


		System.out.println("-----------------------------------------");
		//变量自动类型转换，小到大
		s1 = b1;
		System.out.println("b1 = " + b1 + "  s1 = " + s1);

		System.out.println("-----------------------------------------");
		//强制类型的转换，大到小，
		// b1 = s1;//错误: 不兼容的类型: 从short转换到byte可能会有损
		// s1 = 128;//错误: -128,
		b1 = (byte)s1;
		System.out.println("b1 = " + b1);

		Long l1 = 12312;
		System.out.println("l1 = " + l1);

	}

}
